//
//  KTSettingTVC.m
//  KTLotteryTicket
//
//  Created by CoolKi on 16/3/11.
//  Copyright © 2016年 CoolKi. All rights reserved.
//

#import "KTSettingTVC.h"
#import "KTNoticTVC.h"

@interface KTSettingTVC ()

@end

@implementation KTSettingTVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIBarButtonItem * rightBtnItm = [[UIBarButtonItem alloc]initWithTitle:@"常见问题" style:UIBarButtonItemStylePlain target:self action:@selector(question)];
    rightBtnItm.tintColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = rightBtnItm;
    
    [self setGroup0];
    [self setGroup1];
    [self setGroup2];
    
}
- (void)question{
    UIViewController * questionVC = [[UIViewController alloc]init];
    questionVC.view.backgroundColor = [UIColor redColor];
    [self.navigationController pushViewController:questionVC animated:YES];
}

- (void)setGroup0{

    KTArrowCellModel * model0 = [KTArrowCellModel cellModelByCellTitle:@"使用兑换吗" DetailTitle:@"" AndIconImageName:@"RedeemCode"];
    
    
    KTGroupModel * groupModel = [KTGroupModel groupModelWithHeaderTitle:@"区头标题" FooterTitle:@"区脚标题" CellModelArr:@[model0]];
    groupModel.headerStr = @"0,headerStr";
    groupModel.footerStr = @"0footerStr";
    
    [self.groupArr addObject:groupModel];
}
- (void)setGroup1{
    
    KTArrowCellModel * model0 = [KTArrowCellModel cellModelByCellTitle:@"推送和提醒" DetailTitle:@"" AndIconImageName:@"MorePush"];
    model0.destanceClss = [KTNoticTVC class];
    
    //给 KTSwitchCellModel 添加TaskBlock 代码（这段代码将会在cell的switchChange方法中执行）
    KTSwitchCellModel * model1 = [KTSwitchCellModel cellModelByCellTitle:@"使用摇一摇机选" DetailTitle:@"" AndIconImageName:@"more_homeshake"];
    model1.taskBlock = ^(BOOL switchValue){
        NSLog(@"使用摇一摇机选开关值－%d",switchValue);
    };
    
    KTSwitchCellModel * model2 = [KTSwitchCellModel cellModelByCellTitle:@"声音效果" DetailTitle:@"" AndIconImageName:@"sound_Effect"];
    model2.taskBlock = ^(BOOL switchValue){
        NSLog(@"声音效果-%d",switchValue);
    };
    
    KTSwitchCellModel * model3 = [KTSwitchCellModel cellModelByCellTitle:@"购彩小助手" DetailTitle:@"" AndIconImageName:@"More_LotteryRecommend"];
    model3.taskBlock = ^(BOOL switchValue){
        NSLog(@"购彩小助手-%d",switchValue);
    };
    
    KTGroupModel * groupModel = [KTGroupModel groupModelWithHeaderTitle:@"区头标题" FooterTitle:@"区脚标题" CellModelArr:@[model0,model1,model2,model3]];
    groupModel.headerStr = @"1,headerStr";
    groupModel.footerStr = @"1footerStr";
    
    [self.groupArr addObject:groupModel];
}
- (void)setGroup2{
    
    KTBaseCellModel * model0 = [KTArrowCellModel cellModelByCellTitle:@"检查新版本" DetailTitle:@"" AndIconImageName:@"MoreUpdate"];
    KTBaseCellModel * model1 = [KTArrowCellModel cellModelByCellTitle:@"分享" DetailTitle:@"" AndIconImageName:@"MoreShare"];
    KTBaseCellModel * model2 = [KTArrowCellModel cellModelByCellTitle:@"产品推荐" DetailTitle:@"" AndIconImageName:@"MoreNetease"];
    KTBaseCellModel * model3 = [KTArrowCellModel cellModelByCellTitle:@"购彩小助手" DetailTitle:@"" AndIconImageName:@"MoreAbout"];
    
    KTGroupModel * groupModel = [KTGroupModel groupModelWithHeaderTitle:@"关于" FooterTitle:@"区脚标题" CellModelArr:@[model0,model1,model2,model3]];
    groupModel.headerStr = @"2,headerStr";
    groupModel.footerStr = @"2footerStr";
    
    [self.groupArr addObject:groupModel];
}

@end








